package com.zyj.report.controller;

import com.zyj.common.annotation.Log;
import com.zyj.common.core.controller.BaseController;
import com.zyj.common.core.domain.AjaxResult;
import com.zyj.common.core.domain.entity.SysUser;
import com.zyj.common.core.page.TableDataInfo;
import com.zyj.common.enums.BusinessType;
import com.zyj.common.utils.DateUtils;
import com.zyj.common.utils.http.HttpUtils;
import com.zyj.common.utils.poi.ExcelUtil;
import com.zyj.receive.domain.AssetsReceive;
import com.zyj.receive.service.IAssetsReceiveService;
import com.zyj.report.domain.AssetsReportRepairs;
import com.zyj.report.service.IAssetsReportRepairsService;
import com.zyj.system.service.ISysRoleService;
import com.zyj.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


/**
 * 维修报统计Controller
 * 
 * @author zhuyujie
 * @date 2022-05-14
 */
@Controller
@RequestMapping("/assets/report")
public class AssetsReportController extends BaseController
{
    private String prefix = "assets/report";

    @Autowired
    private IAssetsReportRepairsService assetsReportRepairsService;

    @Autowired
    private IAssetsReceiveService assetsReceiveService;

    @Autowired
    private ISysRoleService roleService;

    @Autowired
    private ISysUserService sysUserService;

    @GetMapping("/assetsSatausReport")
    public String assetsSatausReport()
    {
        return prefix + "/assetsSatausReport";
    }

    /**
     * 资产状态统计
     */
    @PostMapping("/assetsSatausReportlist")
    @ResponseBody
    public TableDataInfo assetsSatausReportlist(AssetsReportRepairs assetsReportRepairs)
    {
        startPage();
        List<AssetsReportRepairs> list = assetsReportRepairsService.assetsSatausReportlist(assetsReportRepairs);
        return getDataTable(list);
    }
}
